﻿@model TVShows_EF5.Models.Episodio

@{
    ViewBag.Title = "Create";
}

<h2>Create</h2>

@using (Html.BeginForm()) {
    @Html.ValidationSummary(true)

    <fieldset>
        <legend>Episodio</legend>

        <select id="tshow_id" name="tvshow_id">
            @using (var db = new TVShows_EF5.Models.TVShowsContext()) {
                foreach (var tvs in db.TVShows) {
                    <option value="@tvs.id">@tvs.nombre</option>
                }
            }
        </select>

        <div class="editor-label">
            @Html.LabelFor(model => model.temporada)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.temporada)
            @Html.ValidationMessageFor(model => model.temporada)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.capitulo)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.capitulo)
            @Html.ValidationMessageFor(model => model.capitulo)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.trama)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.trama)
            @Html.ValidationMessageFor(model => model.trama)
        </div>

        <div class="editor-label">
            @Html.LabelFor(model => model.primeraEmision)
        </div>
        <div class="editor-field">
            @Html.EditorFor(model => model.primeraEmision)
            @Html.ValidationMessageFor(model => model.primeraEmision)
        </div>

        <p>
            <input type="submit" value="Create" />
        </p>
    </fieldset>
}

<div>
    @Html.ActionLink("Back to List", "Index")
</div>

@section Scripts {
    @Scripts.Render("~/bundles/jqueryval")
}
